﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.ServiceModel;
using SalientBrain.Util.Linq;

namespace NoResponseAlarm.Server.WPF
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            StartServer();
        }
        public void StartServer()
        {            
            ServiceHost host;
            NoResponseAlarm.Service.NoResponseRegistrar service = new Service.NoResponseRegistrar();
            service.EventRegistered += new EventHandler(service_EventRegistered);
            host = new ServiceHost(service);
            //host.BaseAddresses
            host.Open();
            //OperationContext.Current.OperationCompleted += new EventHandler(Current_OperationCompleted);
        }

        void service_EventRegistered(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        void Current_OperationCompleted(object sender, EventArgs e)
        {            
            throw new NotImplementedException();
        }
        /*
        protected override void OnStop()
        {
            if (host != null)
                host.Close();
        }
        */
    }
}
